<?php

namespace App\Models;

use Jenssegers\Mongodb\Eloquent\Model as Eloquent;

class HdpChannel extends Eloquent
{
    //http://www.hdplive.net/channellist.xml
    protected $connection = 'mongodb';
    protected $collection = 'hdpChannel';

    protected $fillable = ['name' , 'num', 'type' ,'channel_code'];


    public function format2AI()
    {
        return [
            'active_model' => 'channel',
            'active_type' => 'activity',
            'name' => $this->name,
            'package_name' => 'hdpfans.com',
            'class_name' => 'hdp.player.StartActivity',
            'extra' => [
                ['key' => "ChannelNum", 'value' => $this->num]
            ]
        ];
    }

}
